import request from '@/utils/axios'

export function getScripts(params) {
  let url = '/script/listAllScripts'
  return request(url, {
    method: 'GET',
    params: params
  })
}

export function addScript(params) {
  let url = '/script/createScript'
  return request(url, {
    method: 'POST',
    body: params
  })
}

export function editScript(params) {
  let url = '/script/editScript'
  return request(url, {
    method: 'POST',
    body: params
  })
}

export function delScript(params) {
  let url = '/script/deleteScript'
  return request(url, {
    method: 'POST',
    params: params
  })
}
